import {httpGet, httpPost, httpPut} from '@frontend/vue-common'
import {getCurrentGlobalProperties} from "@frontend/vue-common/src/app";

export const listBusinessCertificateAPI = (pageNum, pageSize, sortField, sortOrder, filter) => {
    return httpGet("/v1/soms/businessCertificate", {
        pageNum: pageNum,
        pageSize: pageSize,
        sortField: sortField,
        sortOrder: sortOrder,
        name: filter.name,
		code: filter.code,
		remark: filter.remark,
		attachment: filter.attachment,
		dueDate: filter.dueDate,
		impendingReminderDays: filter.impendingReminderDays,
		status: filter.status,
		
    })
}

export const addBusinessCertificateAPI = (data) => {
    return httpPut("/v1/soms/businessCertificate", data)
}

export const getBusinessCertificateAPI = (data) => {
    return httpGet(`/v1/soms/businessCertificate/${data.id}`, {})
}

export const editBusinessCertificateAPI = (data) => {
    return httpPost(`/v1/soms/businessCertificate/${data.id}`, data)
}

export const deleteBusinessCertificateAPI = (ids) => {
    return httpPost(`/v1/soms/batchDeleteBusinessCertificate`, {
        ids: ids,
    })
}

